﻿using System;
using System.Web.UI;

public partial class Shared_UserControl_GridInlineCommandEx : AdminBaseUserControl
{
    protected override void OnLoad(EventArgs e)
    {
        if (!useExternalEdit)
        {
            lEdit.CommandName = "Edit";
        }
        //权限相关
        if (!CurrentUserGroup.HasDel)
            lDel.Visible = false;

        base.OnLoad(e);
    }

    private bool useExternalEdit;

    /// <summary>
    /// 使用外部编辑
    /// </summary>
    public bool UseExternalEdit
    {
        set
        {
            useExternalEdit = value;
        }
    }

    public object EditParameter
    {
        set
        {
            lEdit.Attributes["eid"] = value.ToString();
        }
    }

    protected string deleteMessage = "确定要删除这条数据吗？";
    public string DeleteMessage
    {
        set{
            deleteMessage = value;
        }
    }

    public bool ShowDelete
    {
        set
        {
            lDel.Visible = value;
        }
    }
}